package com.ljfiction.book.readview;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.view.View;

/**
 * Created by admin on 2017/8/24.
 */


public class CircleBitmap implements Drawyuan, View.OnClickListener {

    private Bitmap bg;
    private String uuid;
    private Bitmap newBitmap = null;
    private Context context;
    private int x;
    private int y;

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }



    private CircleBitmap(Bitmap bg, String uuid, Context context) {

        this.bg = bg;
        this.uuid = uuid;
        this.context = context;
        Matrix matrix = new Matrix();
        matrix.setScale(0.5f, 0.5f);
         newBitmap=Bitmap.createBitmap(bg,0,0,bg.getWidth(),bg.getHeight(),matrix,true);

    }

    @Override
    public Bitmap getbitmap() {

        return newBitmap;
    }

    @Override
    public int getX() {
        return x;
    }

    @Override
    public int getY() {
        return y;
    }

    @Override
    public String getUUid() {
        return null;
    }

    @Override
    public void onClick(View v) {

    }
}

